s = input().split(" ")
a = int(s[0])
n = int(s[1])
total = 0
cur = 0
for i in range(n):
    cur = cur * 10 + a
    total += cur
print(total)
